﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{
	/// <summary>
	/// 实体类TB_Sys_ExamScoreTypeItem 。(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
	public class TB_Sys_ExamScoreTypeItem : Entity 
	{
		public TB_Sys_ExamScoreTypeItem():base("TB_Sys_ExamScoreTypeItem") {    _TypeItemID=Guid.NewGuid().ToString();}

        #region Model
        private string _TypeItemID;
        private string _ExamYear;
        private string _ExamScoreTypeID;
        private string _SpecialityLevelTypeItemNO;
        private string _SpecialityLevelTypeItemName;
        private decimal? _MinScore;
        private decimal? _MaxScore;
        private int? _Sort;
        private decimal? _Weight;
        /// <summary>
        /// 主键
        /// </summary>
        public string TypeItemID
        {
            get { return _TypeItemID; }
            set
            {
                this.OnPropertyValueChange(_.TypeItemID, _TypeItemID, value);
                this._TypeItemID = value;
            }
        }
        /// <summary>
        /// 考试年度
        /// </summary>
        public string ExamYear
        {
            get { return _ExamYear; }
            set
            {
                this.OnPropertyValueChange(_.ExamYear, _ExamYear, value);
                this._ExamYear = value;
            }
        }
        /// <summary>
        /// 专业-级别-评分方式主键
        /// </summary>
        public string ExamScoreTypeID
        {
            get { return _ExamScoreTypeID; }
            set
            {
                this.OnPropertyValueChange(_.ExamScoreTypeID, _ExamScoreTypeID, value);
                this._ExamScoreTypeID = value;
            }
        }
        /// <summary>
        /// 评分项编码
        /// </summary>
        public string SpecialityLevelTypeItemNO
        {
            get { return _SpecialityLevelTypeItemNO; }
            set
            {
                this.OnPropertyValueChange(_.SpecialityLevelTypeItemNO, _SpecialityLevelTypeItemNO, value);
                this._SpecialityLevelTypeItemNO = value;
            }
        }
        /// <summary>
        /// 评分项名称
        /// </summary>
        public string SpecialityLevelTypeItemName
        {
            get { return _SpecialityLevelTypeItemName; }
            set
            {
                this.OnPropertyValueChange(_.SpecialityLevelTypeItemName, _SpecialityLevelTypeItemName, value);
                this._SpecialityLevelTypeItemName = value;
            }
        }
        /// <summary>
        /// 最低分
        /// </summary>
        public decimal? MinScore
        {
            get { return _MinScore; }
            set
            {
                this.OnPropertyValueChange(_.MinScore, _MinScore, value);
                this._MinScore = value;
            }
        }
        /// <summary>
        /// 最高分
        /// </summary>
        public decimal? MaxScore
        {
            get { return _MaxScore; }
            set
            {
                this.OnPropertyValueChange(_.MaxScore, _MaxScore, value);
                this._MaxScore = value;
            }
        }
        /// <summary>
        /// 排序
        /// </summary>
        public int? Sort
        {
            get { return _Sort; }
            set
            {
                this.OnPropertyValueChange(_.Sort, _Sort, value);
                this._Sort = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? Weight
        {
            get { return _Weight; }
            set
            {
                this.OnPropertyValueChange(_.Weight, _Weight, value);
                this._Weight = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
				_.TypeItemID};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.TypeItemID,
				_.ExamYear,
				_.ExamScoreTypeID,
				_.SpecialityLevelTypeItemNO,
				_.SpecialityLevelTypeItemName,
				_.MinScore,
				_.MaxScore,
				_.Sort,
				_.Weight};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._TypeItemID,
				this._ExamYear,
				this._ExamScoreTypeID,
				this._SpecialityLevelTypeItemNO,
				this._SpecialityLevelTypeItemName,
				this._MinScore,
				this._MaxScore,
				this._Sort,
				this._Weight};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._TypeItemID = DataUtils.ConvertValue<string>(reader["TypeItemID"]);
            this._ExamYear = DataUtils.ConvertValue<string>(reader["ExamYear"]);
            this._ExamScoreTypeID = DataUtils.ConvertValue<string>(reader["ExamScoreTypeID"]);
            this._SpecialityLevelTypeItemNO = DataUtils.ConvertValue<string>(reader["SpecialityLevelTypeItemNO"]);
            this._SpecialityLevelTypeItemName = DataUtils.ConvertValue<string>(reader["SpecialityLevelTypeItemName"]);
            this._MinScore = DataUtils.ConvertValue<decimal?>(reader["MinScore"]);
            this._MaxScore = DataUtils.ConvertValue<decimal?>(reader["MaxScore"]);
            this._Sort = DataUtils.ConvertValue<int?>(reader["Sort"]);
            this._Weight = DataUtils.ConvertValue<decimal?>(reader["Weight"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._TypeItemID = DataUtils.ConvertValue<string>(row["TypeItemID"]);
            this._ExamYear = DataUtils.ConvertValue<string>(row["ExamYear"]);
            this._ExamScoreTypeID = DataUtils.ConvertValue<string>(row["ExamScoreTypeID"]);
            this._SpecialityLevelTypeItemNO = DataUtils.ConvertValue<string>(row["SpecialityLevelTypeItemNO"]);
            this._SpecialityLevelTypeItemName = DataUtils.ConvertValue<string>(row["SpecialityLevelTypeItemName"]);
            this._MinScore = DataUtils.ConvertValue<decimal?>(row["MinScore"]);
            this._MaxScore = DataUtils.ConvertValue<decimal?>(row["MaxScore"]);
            this._Sort = DataUtils.ConvertValue<int?>(row["Sort"]);
            this._Weight = DataUtils.ConvertValue<decimal?>(row["Weight"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_Sys_ExamScoreTypeItem");
            /// <summary>
            /// 主键
            /// </summary>
            public readonly static Field TypeItemID = new Field("TypeItemID", "TB_Sys_ExamScoreTypeItem", "主键");
            /// <summary>
            /// 考试年度
            /// </summary>
            public readonly static Field ExamYear = new Field("ExamYear", "TB_Sys_ExamScoreTypeItem", "考试年度");
            /// <summary>
            /// 专业-级别-评分方式主键
            /// </summary>
            public readonly static Field ExamScoreTypeID = new Field("ExamScoreTypeID", "TB_Sys_ExamScoreTypeItem", "专业-级别-评分方式主键");
            /// <summary>
            /// 评分项编码
            /// </summary>
            public readonly static Field SpecialityLevelTypeItemNO = new Field("SpecialityLevelTypeItemNO", "TB_Sys_ExamScoreTypeItem", "评分项编码");
            /// <summary>
            /// 评分项名称
            /// </summary>
            public readonly static Field SpecialityLevelTypeItemName = new Field("SpecialityLevelTypeItemName", "TB_Sys_ExamScoreTypeItem", "评分项名称");
            /// <summary>
            /// 最低分
            /// </summary>
            public readonly static Field MinScore = new Field("MinScore", "TB_Sys_ExamScoreTypeItem", "最低分");
            /// <summary>
            /// 最高分
            /// </summary>
            public readonly static Field MaxScore = new Field("MaxScore", "TB_Sys_ExamScoreTypeItem", "最高分");
            /// <summary>
            /// 排序
            /// </summary>
            public readonly static Field Sort = new Field("Sort", "TB_Sys_ExamScoreTypeItem", "排序");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Weight = new Field("Weight", "TB_Sys_ExamScoreTypeItem", "Weight");
        }
        #endregion


    }
}

